package aufgaben170311;

import java.io.*;
public class CryptoInputStream extends FilterInputStream {

	int sub;

	public CryptoInputStream(InputStream in, int sub) {
		super(in);
		this.sub = sub;
	}

	@Override
	public int read() throws IOException {
		int n = in.read();
		return n == -1 ? -1 : (n - sub) & 0x000000FF;
	}
}
